/*
 * Copyright 2006-2008 Michele Mostarda ( michele.mostarda@gmail.com ).
 * All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.graphnav.swing;

import java.awt.Point;

/**
 * Interface provided by any fade processor used to smooth moving events in {@link org.graphnav.swing.GraphPanel}.
 */
public interface EffectProcessor {

    /**
     * Adds a movement to the processor.
     *
     * @param s
     * @param p
     * @return
     */
    EffectProcessor addMovement(MovableShape s, Point p);

    /**
     * Adds a dissolvence.
     *
     * @param r
     * @return
     */
    EffectProcessor addDissolvence(Renderable r);

    /**
     * Adds a dissolvence.
     *
     * @param l
     * @return
     */
    EffectProcessor addDissolvence(java.util.List l);

    /**
     * Sets the new center.
     *
     * @param x
     * @param y
     * @return
     */
    EffectProcessor setNewCenter(double x, double y);

    /**
     * Moves to the origin.
     *
     * @return
     */
    EffectProcessor moveToOrigin();

    /**
     * Enhances a node.
     *
     * @param n
     * @param showOnlyAdiacents
     * @param layoutAdiacents
     */
    void enhanceNode(Node n, boolean showOnlyAdiacents, boolean layoutAdiacents);

    /**
     * Disables the enhancement.
     */
    void disableEnhancement();

    /**
     * Shifts the view.
     *
     * @param sx
     * @param sy
     */
    void shiftView(double sx, double sy);

    /**
     * Starts the effects.
     */
    void go();
}
